<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction() {
    	if ($this->_helper->user->isLoggedIn()) {
    		$mySession = new Zend_Session_Namespace('mySession');
    		$returnData = array(
    		  "map" => $mySession->placeMarks,
    		  "info" => $this->view->renderMapInfo($mySession->placeMarks, $mySession->trip, $mySession->step),
    		);
    		$this->view->returnData = $returnData;
    	} else {
    	   $this->_redirect("/user/login");
    	}
    }
}

?>
